Skip to content

Switch fake-sys submodule from rhempel to ddemidov#397

Merged
dwalton76 merged 7 commits intoev3dev:developfrom
dwalton76:fake-sys-update
Oct 5, 2017
Merged

Switch fake-sys submodule from rhempel to ddemidov#397
dwalton76 merged 7 commits intoev3dev:developfrom
dwalton76:fake-sys-update

Conversation

@dwalton76
Copy link
Copy Markdown
Collaborator

No description provided.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

Odd that it doesn't have /sys/class/board-info/

@WasabiFan
Copy link
Copy Markdown
Member

  • Is the SHA at the right version?
  • Is the version of the base branch in this PR one that includes the testable path for board info?

@dwalton76
Copy link
Copy Markdown
Collaborator Author

I thought that when I changed the submodule url it would automatically pull in the latest changes but it doesn't. We were behind 5 commits but have those now...fingers crossed.

@WasabiFan
Copy link
Copy Markdown
Member

You need to fix this line.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

to what?

@WasabiFan
Copy link
Copy Markdown
Member

@dwalton76
Copy link
Copy Markdown
Collaborator Author

dwalton76 commented Oct 5, 2017

Before we get to that, something here doesn't add up

robot@evb[ev3dev-lang-python]# pwd
/home/robot/ev3dev-lang-python
robot@evb[ev3dev-lang-python]# git branch
  develop
* fake-sys-update
robot@evb[ev3dev-lang-python]# 
robot@evb[ev3dev-lang-python]# cat .gitmodules 
[submodule "tests/fake-sys"]
	path = tests/fake-sys
	url = https://github.com/ddemidov/ev3dev-lang-fake-sys.git
robot@evb[ev3dev-lang-python]# 
robot@evb[ev3dev-lang-python]# git status
On branch fake-sys-update
Your branch is up-to-date with 'origin/fake-sys-update'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   tests/fake-sys (new commits)

no changes added to commit (use "git add" and/or "git commit -a")
robot@evb[ev3dev-lang-python]# 
robot@evb[ev3dev-lang-python]# cd tests/fake-sys/
robot@evb[fake-sys]# 
robot@evb[fake-sys]# git remote -v
origin	https://github.com/rhempel/ev3dev-lang-fake-sys.git (fetch)
origin	https://github.com/rhempel/ev3dev-lang-fake-sys.git (push)
robot@evb[fake-sys]# 

How is the remote for fake-sys still rhempel? I deleted this directory and re-cloned just to be sure.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

But if I look here
https://github.com/dwalton76/ev3dev-lang-python/tree/fake-sys-update/tests

the fake-sys url does point to ddemidov's repo like we want

@dwalton76
Copy link
Copy Markdown
Collaborator Author

Better now...no idea what I did the first time around to get it in that state...I must not have removed and re-cloned like I thought

robot@evb[~]# 
robot@evb[~]# rm -rf ev3dev-lang-python
robot@evb[~]# git clone --recursive --branch fake-sys-update https://github.com/dwalton76/ev3dev-lang-python.git
Cloning into 'ev3dev-lang-python'...
remote: Counting objects: 2491, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 2491 (delta 39), reused 58 (delta 31), pack-reused 2418
Receiving objects: 100% (2491/2491), 9.33 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (1223/1223), done.
Submodule 'tests/fake-sys' (https://github.com/ddemidov/ev3dev-lang-fake-sys.git) registered for path 'tests/fake-sys'
Cloning into '/home/robot/ev3dev-lang-python/tests/fake-sys'...
remote: Counting objects: 119, done.        
remote: Total 119 (delta 0), reused 0 (delta 0), pack-reused 119        
Receiving objects: 100% (119/119), 10.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (33/33), done.
Submodule path 'tests/fake-sys': checked out '61d8dedecd55614331aa0e6c1d6f180c4a4d949c'
robot@evb[~]# 
robot@evb[~]# cd ev3dev-lang-python
robot@evb[ev3dev-lang-python]# git status
On branch fake-sys-update
Your branch is up-to-date with 'origin/fake-sys-update'.
nothing to commit, working tree clean
robot@evb[ev3dev-lang-python]# cd tests/fake-sys/
robot@evb[fake-sys]# git remote -v
origin	https://github.com/ddemidov/ev3dev-lang-fake-sys.git (fetch)
origin	https://github.com/ddemidov/ev3dev-lang-fake-sys.git (push)
robot@evb[fake-sys]# 

@dwalton76
Copy link
Copy Markdown
Collaborator Author

wohoo all checks have passed!!

@dwalton76 dwalton76 merged commit aeb0155 into ev3dev:develop Oct 5, 2017
Comment thread ev3dev/__init__.py
@@ -48,6 +48,9 @@ def get_current_platform():
"""
board_info_dir = '/sys/class/board-info/'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just use the existing "constant" on the Device class along with the path concatenation method, like we do for sensors/motors/etc. That would eliminate the need for special-casing it. With the code you have now, there'd have been no reason to update the submodule in the first place 😆

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that what got added in the submodule didn't work (there needs to be a board-info directory with specific structure, but board-info in the submodule is just a text file) and just wanted to get the CI tests passing for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, will fix this today.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the EV3 around to test this myself; do I understand correctly there needs to be a board-info/fake-board/uevent file? And that should contain fake?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this is what it looks like on an ev3

robot@ev3[~]# tree /sys/class/board-info/
/sys/class/board-info/
└── board0 -> ../../devices/platform/board/board-info/board0

1 directory, 0 files
robot@ev3[~]# cat /sys/class/board-info/board0/uevent 
BOARD_INFO_HW_REV=7
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=00165346201F
BOARD_INFO_TYPE=main
robot@ev3[~]# 

It needs to contain BOARD_INFO_MODEL=FAKE-SYS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwalton76 dwalton76 deleted the fake-sys-update branch October 5, 2017 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants